#################################################################
# Makefile                                                      #
#                                                               #
# Description: This file contains the make rules for lisod      #
#                                                               #
# Author: Ang Xu <angx@andrew.cmu.edu>                          #
#                                                               #
#################################################################
VPATH = src
CC = gcc
CFLAGS = -Wall -Werror
LFLAGS = -lssl

# dependence
DEPS = liso_engine.h http_parser.h liso_buffer.h liso_logging.h cgi.h

# object files
OBJS = liso.o liso_engine.o http_parser.o liso_buffer.o liso_logging.o \
	   cgi.o

lisod: $(OBJS)
	$(CC) $(CFLAGS) $(OBJS) -o lisod $(LFLAGS)

%.o: %.c $(DEPS)
	$(CC) $(CFLAGS) -c $< -o $@

clean:
	@rm -f lisod $(OBJS)
